﻿#region Copyrights Notice
//©2009 Microsoft Corporation.  All rights reserved.
#endregion

using System;
using System.Data;
using System.Globalization;
using Microsoft.CISG.BitlockerRecovery.BL;

namespace BitlockerRecovery
{
    public partial class Faq : System.Web.UI.Page
    {
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] //Supressing this error since the referenced code is called externally
        void Page_PreInit(Object sender, EventArgs e)
        {
            int AdminRoleID = Int32.Parse(System.Configuration.ConfigurationSettings.AppSettings["AppAdminRoleID"],CultureInfo.InvariantCulture);
            int UserRoleID = CommonBL.ActiveDirectoryPropertyGroupLookup(AdminRoleID);

            if (UserRoleID == AdminRoleID)
            {

                this.MasterPageFile = "~/AdminMain.master";
            }

        }

        protected void Page_Load(object sender, EventArgs e)
        {
            BindFaqDS();
        }
        protected void BindFaqDS()
        {
            DataSet ds = CommonBL.GetFaq();
            FaqRepeater.DataSource = ds;
            FaqRepeater.DataBind();
        }
    }
}
